import request from '@/utils/request'
// 获取组织架构
export const getDepartments = () => request({
  url: '/company/department'
})

// 删除组织架构部门

export const delDepartement = id => request({
  method: 'DELETE',
  url: `/company/department/${id}`
})

// 新增部门
export const addDepartments = data => request({
  method: 'POST',
  url: '/company/department',
  data
})

// 获取某个部门详情
export const getDepartmentDetail = id => request({
  url: `/company/department/${id}`

})

// 更新部门
export const updateDepartments = data => request({
  url: `/company/department/${data.id}`,
  method: 'PUT',
  data
})
